package com.pandora.credit.mongo.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

/**
 * @author developer
 */
@Document(collection = "banner")
public class MongoBanner {

    @Field("_id")
    @JsonProperty("_id")
    private Long id;
    private String name;
    @Field("img_url")
    @JsonProperty("img_url")
    private String imgUrl;
    @Field("dest_url")
    @JsonProperty("dest_url")
    private String destUrl;
    private Integer status;
    private Integer type;
    private MongoActivity.MongoActivityShare sharing;
    private Integer recommend;
    @Field("loan_id")
    @JsonProperty("loan_id")
    private String loanId;
    @Field("created_time")
    @JsonProperty("created_time")
    private Date createdTime;
    @Field("updated_time")
    @JsonProperty("updated_time")
    private Date updatedTime;

    public MongoBanner(){}

    public MongoBanner(Long id, String name, String imgUrl, String destUrl, Integer status, Integer type,
                       MongoActivity.MongoActivityShare sharing, Integer recommend, String loanId, Date createdTime,
                       Date updatedTime) {
        this.id = id;
        this.name = name;
        this.imgUrl = imgUrl;
        this.destUrl = destUrl;
        this.status = status;
        this.type = type;
        this.sharing = sharing;
        this.recommend = recommend;
        this.loanId = loanId;
        this.createdTime = createdTime;
        this.updatedTime = updatedTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getDestUrl() {
        return destUrl;
    }

    public void setDestUrl(String destUrl) {
        this.destUrl = destUrl;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public MongoActivity.MongoActivityShare getSharing() {
        return sharing;
    }

    public void setSharing(MongoActivity.MongoActivityShare sharing) {
        this.sharing = sharing;
    }

    public Integer getRecommend() {
        return recommend;
    }

    public void setRecommend(Integer recommend) {
        this.recommend = recommend;
    }

    public String getLoanId() {
        return loanId;
    }

    public void setLoanId(String loanId) {
        this.loanId = loanId;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }
}
